<template>
    <div class="login">
        <div class="login-div">
            <div class="logo"><img src="../assets/img/logo.png" alt=""></div>
        </div>
        <div class="login-div-form">
            <div class="login-div-form-top">
                <span>注册账户</span>
            </div>
            <form  action="">
                <div class="input">
                    <span></span>
                    <input type="text"  value="" placeholder="用户名/账号/手机号" class="username" v-model="username">
                </div>
                <div class="input">
                    <span></span>
                    <input type="password" value="" placeholder="请输入账户密码" autocomplete="off" v-model="password" class="password">
                </div>
                <div class="input">
                    <span></span>
                    <input type="password"  value="" placeholder="请确认账户密码" class="password" autocomplete="off">
                </div>
                <div class="checkbox">
                    <div role="checkbox" tabindex="0" aria-checked="true" class="van-checkbox fa-check-square">
                        <div class="van-checkbox__icon">
                            <van-checkbox v-model="checked"></van-checkbox>
                        </div>
                        <span class="van-checkbox__label">
                            <span>我已认真阅读且同意<a href="">《菜坝注册协议》</a></span>
                        </span>
                    </div>
                </div>
                <button type="" class="submit"   @click.prevent="handleRes">立即注册</button>
            </form>
            <div  class="login-div-form-a">
            <span>
                <span>已有账户？</span> 
                <router-link to="/login">立即登录</router-link>
            </span>
        </div>
        </div>
    </div>
</template>

<script>
    export default {
      data() {
            return {
            checked: true,
            username:'',
            password:'',
            goodUser:[],
            };
        },  
        methods: {
            handleRes() {
                this.$set(this.goodUser,'username',this.username)
                this.$set(this.goodUser,'password',this.password)
                this.$store.commit("use/AddUserMut",this.goodUser)
            }
        },
    }
  
</script>

<style lang="less" scoped>
@import url('../assets/css/reset.css');
@import url('../assets/css/register.css');
@import url('../assets/font/iconfont.css');
</style>